package com.example.config;

import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.spring.ReferenceBean;
import org.apache.dubbo.rpc.service.GenericService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.example.service.UserService;

@Configuration
public class ReferenceConfiguration {

	/**
	 * 注册使用别名
	 * @return
	 */
	@Bean
	public ReferenceBean<UserService> userServiceExt() {
		return new ReferenceBean();
	}

	@Bean
	@DubboReference(interfaceClass = UserService.class)
	public ReferenceBean<GenericService> genericUserService() {
		return new ReferenceBean();
	}
}
